<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id ID(主键)
 * @property string $location_name 所处地点名称
 * @property string $location_province 所在省份
 * @property string $location_city 所处市
 * @property string $location_area 所处区
 * @property string $location_address 所处详细地址
 * @property string $contacts_name 联系人
 * @property string $contacts_mobile 联系人电话
 * @property integer $create_time 创建时间
 * @property integer $update_time 更新时间
 * @property integer $status 状态，1启用，2不启用
 */
class RlAssemblyLocation extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'rl_assembly_locations';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    public function getAddressDetailsAttribute($val): string
    {
        return sprintf("%s%s%s%s",$this->location_province,$this->location_city,$this->location_area,$this->location_address);
    }

    public $appends=['address_details'];

}
